{{partial('public/header')}}
<div class="midder">

<div class="mc">
{% if strUser['userid'] == visitor['userid']%}
	<h1>{{seo.title}}(<span id="cout_follow">{{strUser['count_follow']}}</span>)</h1>
{% else %}
{{partial('index/user_header')}}  
{% endif %}    
	<div class="cleft">
{% if strUser['userid'] == visitor['userid']%}
 
<ul class="user-list">
{% for item in arrFollowUser %}
    <li class="clearfix" id="u{{item['userid']}}">
        <a title="{{item['username']}}" href="{{url('space/'~item['doname'])}}">
        <img alt="{{item['username']}}" src="{{item['face_48']}}" class="face">
        </a>
        <div class="info">
          <h3> <a title="{{item['username']}}" href="{{url('space/'~item['doname'])}}">{{item['username']}}</a></h3>
          <!-- 签名档 -->
          <p>{{item['area']['areaname']}}</p>
        </div>
        {% if strUser['userid'] == visitor['userid'] %}<span class="ban">取消关注</span>{% endif %}
    </li>
{% endfor %}          
</ul>
 
{% else %}

{% for item in arrFollowUser %}
    <dl class="obu">
    <dt>
    <a class="nbg" title="{{item['username']}}" href="{{url('space/'~item['doname'])}}">
    <img alt="{{item['username']}}" class="m_sub_img" src="{{item['face_48']}}">
    </a>
    </dt>
    <dd><a title="{{item['username']}}" href="{{url('space/'~item['doname'])}}">{{item['username']}}</a></dd>
    </dl>
{% endfor %} 

{% endif %} 

<script language="javascript">
$(function(){
	    $('.user-list li').hover(function () {
            $('.ban', this).show();
        }, function () {
            $('.ban', this).hide();
        });	
})

$('.user-list .ban').click(function () {
	var self = this,
		name = $(this).parent().children().children('h3').children('a').text(),
		msg = '确实不再关注 ' + name + ' 吗?',
		peopleId = $(this).parents('li').attr('id').replace('u', ''),
		hasBlackList = confirm(msg);

	if (hasBlackList) {
		$(this).parents('li').fadeOut(function () {
			var posturl = "{{url('space/contact/unfollowAjax')}}";
			$.post_withck(
				posturl,
				{ 'userid': peopleId },
				function (result) { 
					var obj = $.parseJSON(result);  
					if(obj.res==1){
						$('#cout_follow').text(obj.cout_follow);
						$(self).remove();					
					}else{
						alert(obj.msg)	
					}
				}
			);
		});
	}
});
</script>

    </div>

    <div class="cright">

{% if strUser['userid'] == visitor['userid']%}
        <p class="pl2">
            &gt;&nbsp;<a href="{{url('space/contact/followed/'~strUser['userid'])}}">关注我的人({{strUser['count_followed']}})</a>
        </p> 
{% else %}
        <p class="pl2">
            &gt;&nbsp;<a href="{{url('space/contact/followed/'~strUser['userid'])}}">关注{{strUser['username']}}的人({{strUser['count_followed']}})</a>
        </p> 
{% endif %}               
<!---
        <p class="pl2">
            &gt;&nbsp;<a href="/contacts/find">寻找&nbsp;MSN/Gtalk&nbsp;朋友</a>
        </p>
-->        
        <p class="pl2">
            &gt;&nbsp;<a href="{{url('space/contact/invite')}}">邀请我的朋友加入爱客网</a>
        </p>


    </div>

</div>
</div>
